#include <iostream>
#include"auto_ptr.hpp"

int main()
{
	int* p = new int(1);
	auto_ptr<int> t1(p);
	std::cout << ++(*t1) << std::endl;
	if (p == nullptr)
		std::cout << "int* p is nullptr" << std::endl;

	auto_ptr<int> t2(t1);
	std::cout << --(*t2) << std::endl;
	if (t1 == nullptr)
		std::cout << "auto_ptr<int> t1 is nullptr" << std::endl;

	t1 = t2;
	if (t2 == nullptr)
		std::cout << "auto_ptr<int> t2 is nullptr" << std::endl;
	return 0;
}